package wangm.config;

import org.apache.commons.dbutils.QueryRunner;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.context.WebApplicationContext;

import javax.servlet.ServletOutputStream;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletResponse;
import javax.sql.DataSource;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Collection;
import java.util.Locale;

/**
 * dbConfig
 *
 * @author zk
 * @date 2018-02-23 14:45
 */
@Configuration
public class DbConfig {

    /**
     * queryRunner
     *
     * @param druidDataSource druidDataSource
     * @return queryRunner
     */
    @Bean
    public QueryRunner getQueryRunner(DataSource druidDataSource){
        return new QueryRunner(druidDataSource);
    }

}
